package cn.tedu.dfxd.mapper;

import cn.tedu.dfxd.entity.CommentsInfo;
import cn.tedu.dfxd.entity.Item;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author DBX
 * @effect
 * @date 2022/04/20/13:39
 */
public interface CommentsMapper extends BaseMapper<CommentsInfo> {

    @Insert("insert into comments_info values(#{id},#{type},#{ownerId},#{userId},#{userName},#{itemcatId},#{likeNum},#{content},#{createTime})")
    void insertCom(CommentsInfo commentsInfo);

    @Select("select * from comments_info where type = #{title}")
    List<CommentsInfo> findCommentsList(String title);
}
